<?php

echo "<h3> The upcoming concerts of :". $_GET['parameter']."</h3>";

$input = $_GET['parameter'];




 mysql_connect("localhost", "admin", "") or die(mysql_error());

  mysql_select_db("test") or die(mysql_error());

  $query= "SELECT * FROM concerts WHERE aname = '".$input."' AND TIMEDIFF(starttime, NOW())> 0 ";

  $searchresult = mysql_query($query) or die(mysql_error());  

  echo "<table border='2'>";
  echo "<tr> <th>aname</th> <th>vname</th> <th>starttime</th> <th>endtime</th> <th>fee</th> </tr>";

// keeps getting the next row until there are no more to get

  while($row = mysql_fetch_array( $searchresult )) 
  {
	echo "<tr><td>"; 
      echo $row['aname'];

      echo "</td><td>"; 

      echo "<a href= http://localhost/clickvname.php?parameter=".$row['vname'].">".$row['vname']."</a>";



      echo "</td><td>"; 
      echo $row['starttime'];

      
      echo "</td><td>"; 
      echo $row['endtime'];

      echo "</td><td>"; 
      echo $row['fee'];


	echo "</td></tr>"; 
  } 



?>
